<template>
    <div>
        <input @keydown.enter="fn" type="text">
    </div>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    methods: {
        fn(e) {
            console.log('用户按下回车键',  e);
        }

    }


}
</script>

<style>

</style>